<div class="form-inline">
    <div class="row">
        <div class="form-group col-12 col-sm-6">
            <Select Items="@NullableBoolItems" @bind-Value="@SelectedBoolItem">
            </Select>
        </div>
        <div class="form-group col-12 col-sm-6">
            <div class="form-control">@GetSelectedBoolItemString()</div>
        </div>
    </div>
</div>

@code {
    private IEnumerable<SelectedItem> NullableBoolItems { get; set; } = new SelectedItem[]
    {
        new SelectedItem() { Text = "空值", Value = "" },
        new SelectedItem() { Text = "True 值", Value = "true" },
        new SelectedItem() { Text = "False 值", Value = "false" }
    };

    private bool? SelectedBoolItem = null;

    private string GetSelectedBoolItemString()
    {
        return SelectedBoolItem.HasValue ? SelectedBoolItem.Value.ToString() : "null";
    }
}
